public class Solution2299 {
    public boolean strongPasswordCheckerII(String password) {
        boolean flag=password.length()>7;
        boolean temp=false;
        for (char c : password.toCharArray()) {
            if (c>='a' && c<='z'){
                temp=true;
                break;
            }
        }
        flag&=temp;
        temp=false;
        for (char c : password.toCharArray()) {
            if (c>='A' && c<='Z'){
                temp=true;
                break;
            }
        }
        flag&=temp;
        temp=false;
        for (char c : password.toCharArray()) {
            if (c>='0' && c<='9'){
                temp=true;
                break;
            }
        }
        flag&=temp;
        temp=false;
        for (char c : password.toCharArray()) {
            if (c=='!' || c=='@' || c=='#' || c=='$' || c=='%' || c=='^' || c=='&' || c=='*' || c=='(' || c==')' || c=='-' || c=='+'){
                temp=true;
                break;
            }
        }
        flag&=temp;
        temp=true;
        for (int i=0;i<password.length()-1;i++){
            if (password.charAt(i) == password.charAt(i + 1)) {
                temp = false;
                break;
            }
        }
        flag&=temp;
        return flag;
    }

    public static void main(String[] args) {
        System.out.println(new Solution2299().strongPasswordCheckerII("IloveLe3tcode!"));
    }
}
